/*    */ package com.yss.sofa.cml.export;
/*    */ 
/*    */ import java.util.Collections;
/*    */ import java.util.HashMap;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class SimpleExportContext<RD extends RuntimeDevice>
/*    */   implements ExportContext
/*    */ {
/*    */   private static final long serialVersionUID = 1L;
/*    */   private RD device;
/*    */   private Map<String, Object> properties;
/*    */ 
/*    */   public Object getProperty(String key)
/*    */   {
/* 24 */     if (this.properties != null) {
/* 25 */       return this.properties.get(key);
/*    */     }
/* 27 */     return null;
/*    */   }
/*    */ 
/*    */   public void setProperty(String key, Object value)
/*    */   {
/* 32 */     if (this.properties == null) {
/* 33 */       synchronized (this) {
/* 34 */         this.properties = new HashMap();
/*    */       }
/*    */     }
/* 37 */     this.properties.put(key, value);
/*    */   }
/*    */ 
/*    */   public Map<String, Object> getProperties()
/*    */   {
/* 42 */     if (this.properties != null) {
/* 43 */       return Collections.unmodifiableMap(this.properties);
/*    */     }
/* 45 */     return Collections.emptyMap();
/*    */   }
/*    */ 
/*    */   public void setRuntimeDevice(RD device) {
/* 49 */     this.device = device;
/*    */   }
/*    */ 
/*    */   public RD getRuntimeDevice()
/*    */   {
/* 54 */     return this.device;
/*    */   }
/*    */ }

/* Location:           X:\repository\com\yss\sofa\cml\cml-api\1.1.0\cml-api-1.1.0.jar
 * Qualified Name:     com.yss.sofa.cml.export.SimpleExportContext
 * JD-Core Version:    0.6.0
 */